package fr.thelem.gestiondemandesthelem.dao.model;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Entité CorrespondanceParametres : Permet la transcodification
 */
@Entity
@Table(name = "CORRESPONDANCE_PARAMETRES")
public class CorrespondanceParametresEntity implements Serializable {

    /** Attribut serialVersionUID */
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "ID_CORRESPONDANCE_PARAMETRES")
    @GeneratedValue
    private int identifiantCorrespondanceParametres;

    @ManyToOne
    @JoinColumn(name = "IDENTIFIANT_CD_PARAMETRE_DEMANDE")
    private CDParametreDemandeEntity CDParametresDemandeCorrespondanceParametre;

    @ManyToOne
    @JoinColumn(name = "IDENTIFIANT_CD_PARAMETRE_ETAPE")
    private CDParametreEtapeEntity CDParametresEtapeCorrespondanceParametre;

    @ElementCollection
    private Map<CDEtapeEntity, String> valeurCDParametreEtape;

    /**
     * Constructeur
     */
    public CorrespondanceParametresEntity() {
        super();
        this.valeurCDParametreEtape = new HashMap<CDEtapeEntity, String>();
    }

    /**
     * Accesseur de identifiantCorrespondanceParametres
     * 
     * @return le identifiantCorrespondanceParametres
     */
    public int getIdentifiantCorrespondanceParametres() {
        return identifiantCorrespondanceParametres;
    }

    /**
     * Affectation de identifiantCorrespondanceParametres
     * 
     * @param identifiantCorrespondanceParametres identifiantCorrespondanceParametres à affecter
     */
    public void setIdentifiantCorrespondanceParametres(int identifiantCorrespondanceParametres) {
        this.identifiantCorrespondanceParametres = identifiantCorrespondanceParametres;
    }

    /**
     * Accesseur de cDParametresDemandeCorrespondanceParametre
     * 
     * @return le cDParametresDemandeCorrespondanceParametre
     */
    public CDParametreDemandeEntity getCDParametresDemandeCorrespondanceParametre() {
        return CDParametresDemandeCorrespondanceParametre;
    }

    /**
     * Affectation de cDParametresDemandeCorrespondanceParametre
     * 
     * @param cDParametresDemandeCorrespondanceParametre cDParametresDemandeCorrespondanceParametre à affecter
     */
    public void setCDParametresDemandeCorrespondanceParametre(CDParametreDemandeEntity cDParametresDemandeCorrespondanceParametre) {
        CDParametresDemandeCorrespondanceParametre = cDParametresDemandeCorrespondanceParametre;
    }

    /**
     * Accesseur de cDParametresEtapeCorrespondanceParametre
     * 
     * @return le cDParametresEtapeCorrespondanceParametre
     */
    public CDParametreEtapeEntity getCDParametresEtapeCorrespondanceParametre() {
        return CDParametresEtapeCorrespondanceParametre;
    }

    /**
     * Affectation de cDParametresEtapeCorrespondanceParametre
     * 
     * @param cDParametresEtapeCorrespondanceParametre cDParametresEtapeCorrespondanceParametre à affecter
     */
    public void setCDParametresEtapeCorrespondanceParametre(CDParametreEtapeEntity cDParametresEtapeCorrespondanceParametre) {
        CDParametresEtapeCorrespondanceParametre = cDParametresEtapeCorrespondanceParametre;
    }

    /**
     * Accesseur de valeurCDParametreEtape
     * 
     * @return le valeurCDParametreEtape
     */
    public Map<CDEtapeEntity, String> getValeurCDParametreEtape() {
        return valeurCDParametreEtape;
    }

    /**
     * Affectation de valeurCDParametreEtape
     * 
     * @param valeurCDParametreEtape valeurCDParametreEtape à affecter
     */
    public void setValeurCDParametreEtape(Map<CDEtapeEntity, String> valeurCDParametreEtape) {
        this.valeurCDParametreEtape = valeurCDParametreEtape;
    }

}
